home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEV / A-B / 607+gest.cpt / soundMgr.h < prev   
Text File  |  1990-10-17  |  16KB  |  596 lines

  1. /*
  2. /*  SoundMgr.h for system 6.0.6 
  3.  *
  4.  *  Copyright (c) 1990 Symantec Corporation.  All rights reserved.
  5.  *
  6.  *  These interfaces are based on material copyrighted
  7.  *  by Apple Computer, Inc., 1985-1990.
  8.  *
  9.  *    Written 10/9/90 MYG  based on the  MPW sound.h of 6-14-90
  10.  *        Notes:  "Time" is a low memory global defined in OSUtil.h Therefore
  11.  *                the type "Time" in the MPW header has been Redefined as "time".
  12.  *                Note the case!!!!
  13.  *
  14.  *    Revised 10/16/90 MYG added error codes from errors.h
  15. */
  16.  
  17. #ifndef _SoundMgr_
  18. #define _SoundMgr_
  19.  
  20. #ifndef _MacTypes_
  21. #include <MacTypes.h>
  22. #endif
  23.  
  24.  
  25. #ifndef _SANE_ 
  26. #if sizeof(double) == 12
  27. #include <SANE.h>
  28. #endif
  29. #endif
  30.  
  31. #define const
  32.  
  33. #define synthCodeRsrc             'snth'
  34. #define soundListRsrc             'snd '
  35.  
  36. /* synthesizer numbers for SndNewChannel */
  37.  
  38. #define noteSynth                 1            /*note synthesizer*/
  39. #define waveTableSynth            3            /*wave table synthesizer*/
  40. #define sampledSynth             5            /*sampled sound synthesizer*/
  41.  
  42. /* Param2 values */
  43.  
  44. #define twelthRootTwo             1.05946309434
  45. #define infiniteTime             0x7FFFFFFF
  46.  
  47. /* command numbers for SndDoCommand */
  48. enum {
  49.     nullCmd,
  50.     initCmd,
  51.     freeCmd,
  52.     quiteCmd,
  53.     flushCmd,
  54.     reInitCmd,
  55.     waitCmd = 10,
  56.     pauseCmd,
  57.     resumeCmd,
  58.     callBackCmd,
  59.     syncCmd,
  60.     emptyCmd,
  61.     tickleCmd = 20,
  62.     requestNextCmd,
  63.     howOftenCmd,
  64.     wakeUpCmd,
  65.     availableCmd,
  66.     versionCmd,
  67.     totalLoadCmd,
  68.     loadCmd,
  69.     scaleCmd = 30,
  70.     tempoCmd,
  71.     noteCmd = 40,
  72.     restCmd,
  73.     freqCmd,
  74.     ampCmd,
  75.     timbreCmd,
  76.     waveTableCmd = 60,
  77.     phaseCmd,
  78.     soundCmd = 80,
  79.     bufferCmd,
  80.     rateCmd,
  81.     continueCmd,
  82.     doubleBufferCmd,
  83.     getRateCmd,
  84.     sizeCmd = 90,
  85.     convertCmd
  86. };
  87.     
  88.     
  89.  
  90.  
  91. #define stdQLength                128
  92. #define dataPointerFlag            0x8000
  93.  
  94. #define waveInitChannelMask        0x07
  95. enum {
  96.     waveInitChannel0 = 0x04,
  97.     waveInitChannel1,
  98.     waveInitChannel2,
  99.     waveInitChannel3
  100. };
  101.  
  102. #define initSRateMask            0x0030
  103. #define initStereoMask            0x00C0
  104. #define initChanLeft             0x0002        /*left stereo channel */
  105. #define initChanRight             0x0003        /*right stereo channel*/
  106. #define initSRate22k             0x0020        /*22k sampling rate*/
  107. #define initMono                 0x0080        /*monophonic channel*/
  108. #define initStereo                 0x00C0        /*stereo channel*/
  109. #define    initNoInterp             0x0004        /*no Linear Interpolation with the SR Convert*/
  110. #define initNoSRC                0x0008
  111. #define initNoMultiChannel        0x1000
  112. #define initMACE3                0x0300
  113. #define initMACE6                0x0400
  114.  
  115. #define    stdSH                    0x00        
  116. #define    extSH                    0xFF
  117. #define    cmpSH                    0xFE
  118.  
  119. enum {
  120.     notCompressed,
  121.     twoToOne,
  122.     eightToThree,
  123.     threeToOne,
  124.     sixToOne
  125. };
  126.     
  127. enum {
  128.     outsideCmpSH,
  129.     insideCmpSH
  130. };
  131.  
  132. enum {
  133.     aceSuccess,
  134.     aceMemFull,
  135.     aceNilBlock,
  136.     aceBadComp,
  137.     aceBadEncode,
  138.     aceBadDest,
  139.     aceBadCmd,
  140.     sixToOnePacketSize = 8,
  141.     threeToOnePacketSize = 16,
  142.     leftOverBlockSize = 32,
  143.     stateBlockSize = 64
  144. };
  145.         
  146.  
  147. #define firstSoundFormat        0x0001        /* general sound format */
  148. #define secondSoundFormat        0x0002        /* special sampled sound format */
  149.  
  150. typedef long                    time;        /* in half milliseconds */
  151.  
  152. typedef unsigned char            Wave[256];
  153. typedef Wave                    *WavePtr;
  154.  
  155.  
  156. #define sysBeepDisable            0x0000
  157. #define sysBeepEnable            0x0001
  158.  
  159.                                             /* unitTypes for AudioSelection.unitType */
  160. #define unitTypeNoSelection        0xFFFF
  161. #define unitTypeSeconds            0x0000
  162.  
  163.                         
  164. #define    dbBufferEmpty        0x00000000        /* Constants for SndPlayDoubleBuffer*/    
  165. #define    dbBufferEmptyMask    0xFFFFFFFE
  166. #define    dbBufferReady        0x00000001
  167. #define    dbBufferExhausted    0x00000002
  168. #define    dbLastBuffer        0x00000004
  169.  
  170.  
  171. /*••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
  172. /*
  173. /*            Error Codes for Sound Manager and Sound Manager 7.0
  174. /*
  175. /*••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
  176. enum {
  177.     badParam = -213,        /* invalid argument */
  178.     noMoreRealTime,            /* not enought CPU cycles left to add another task */
  179.     channelNotBusy,
  180.     buffersTooSmall,        /* can not operate in the memory allowed            */
  181.     channelBusy,            /* the Channel is being used for a PFD already        */
  182.     badFileFormat,            /* was not type AIFF or was of bad format,corrupt     */
  183.     notEnoughBufferSpace,    /* could not allocate enough memory                 */
  184.     badFormat,
  185.     badChannel,
  186.     resProblem,
  187.     queueFull,
  188.     notEnoughHardware = -201,
  189.     noHardware 
  190. };
  191.  
  192. /*••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
  193. /*
  194. /*            Structures for Sound Driver
  195. /*
  196. /*••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
  197.  
  198. typedef unsigned char FreeWave[30001];
  199.  
  200. struct FFSynthRec {
  201.     short mode;
  202.     Fixed count;
  203.     FreeWave waveBytes;
  204. };
  205.  
  206. typedef struct FFSynthRec FFSynthRec;
  207. typedef FFSynthRec *FFSynthPtr;
  208.  
  209. struct Tone {
  210.     short count;
  211.     short amplitude;
  212.     short duration;
  213. };
  214.  
  215. typedef struct Tone Tone;
  216. typedef Tone Tones[5001];
  217.  
  218. struct SWSynthRec {
  219.     short mode;
  220.     Tones triplets;
  221. };
  222.  
  223. typedef struct SWSynthRec SWSynthRec;
  224. typedef SWSynthRec *SWSynthPtr;
  225.  
  226. struct FTSoundRec {
  227.     short duration;
  228.     Fixed sound1Rate;
  229.     long sound1Phase;
  230.     Fixed sound2Rate;
  231.     long sound2Phase;
  232.     Fixed sound3Rate;
  233.     long sound3Phase;
  234.     Fixed sound4Rate;
  235.     long sound4Phase;
  236.     WavePtr sound1Wave;
  237.     WavePtr sound2Wave;
  238.     WavePtr sound3Wave;
  239.     WavePtr sound4Wave;
  240. };
  241.  
  242. typedef struct FTSoundRec FTSoundRec;
  243. typedef FTSoundRec *FTSndRecPtr;
  244.  
  245. struct FTSynthRec {
  246.     short mode;
  247.     FTSndRecPtr sndRec;
  248. };
  249.  
  250. typedef struct FTSynthRec FTSynthRec;
  251. typedef FTSynthRec *FTSynthPtr;
  252.  
  253.  
  254. /*••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
  255. /*
  256. /*            Structures for Sound Manager
  257. /*
  258. /*••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
  259.  
  260.  
  261. typedef struct SndCommand {
  262.     unsigned short    cmd;
  263.     short            param1;
  264.     long            param2;
  265. }SndCommand;
  266.  
  267.  
  268. typedef struct SndChannel    *SndChannelPtr;
  269.  
  270. #define SndCompletionProcPtr ProcPtr
  271. #define SndCallBackProcPtr ProcPtr
  272.  
  273. /*typedef pascal    void        (*SndCompletionProcPtr)(void);*/
  274. /*typedef pascal    Boolean        (*SndCallBackProcPtr)(SndChannelPtr chan, SndCommand cmd);*/
  275. typedef ProcPtr                SndModifierProcPtr;
  276.  
  277.  
  278. typedef struct SoundHeader
  279. {
  280.     char                    * samplePtr;    /* if NIL then samples are in sampleArea                         */
  281.     unsigned long            length;
  282.     Fixed                    sampleRate;
  283.     unsigned long            loopStart,
  284.                             loopEnd;
  285.     unsigned char            encode;            /* <hbs 12/20/88> header type                                     */
  286.     unsigned char            baseNote;        /* <hbs 12/20/88> basenote now byte                             */
  287. #ifndef __cplusplus
  288.     char                    sampleArea[];
  289. #endif
  290. } SoundHeader;
  291.  
  292. typedef SoundHeader *SoundHeaderPtr;
  293.  
  294.  
  295. typedef struct SndChannel {
  296.     SndChannelPtr            nextChan;
  297.     Ptr                        firstMod;
  298.     SndCallBackProcPtr        callBack;
  299.     long                    userInfo;
  300.     long                    wait;            /* The following is for internal Sound Manager use only.*/
  301.     SndCommand                cmdInProgress;
  302.     short                    flags;
  303.     short                    qLength;
  304.     short                    qHead;            /* next spot to read or -1 if empty        */
  305.     short                    qTail;            /* next spot to write = qHead if full    */
  306.     SndCommand                queue[128];
  307. } SndChannel;
  308.  
  309.  
  310.  
  311. typedef struct ModifierStub {
  312.     struct ModifierStub     *nextStub;
  313.     SndModifierProcPtr         code;
  314.     long                     userInfo;
  315.     time                     count;
  316.     time                     every;
  317.     char                     flags;
  318.     char                     hState;
  319. } ModifierStub;
  320.  
  321. /*______________________ <hbs 1/10/89> structs for mace____________________________ */
  322.  
  323.  
  324. typedef struct{
  325.     short                        stateVar[stateBlockSize] ;
  326. }   StateBlock, *StateBlockPtr;    
  327.  
  328.  
  329. typedef struct 
  330. {
  331.     unsigned long                count;
  332.     char                        sampleArea[leftOverBlockSize];
  333. }
  334. LeftOverBlock, *LeftOverBlockPtr;
  335.  
  336.  
  337. typedef struct
  338.  {
  339.     char                 *samplePtr;            /* if nil then samples are in sample area                        */
  340.     unsigned long         numChannels;        /* CAFF, number of channels  mono = 1                             */
  341.     Fixed                sampleRate;            /* sample rate in Apples Fixed point representation                */
  342.     unsigned long         loopStart;            /* loopStart of sound before compression                        */
  343.     unsigned long         loopEnd;            /* loopEnd of sound before compression                            */
  344.     unsigned char         encode;                /* data structure used ,  stdSH, extSH, or cmpSH                */
  345.     unsigned char         baseNote;            /* same meaning as regular SoundHeader                            */
  346.     unsigned long         numFrames;            /* length in frames    ( packetFrames or sampleFrames                */
  347. #if sizeof(double) == 12    
  348.     extended80            AIFFSampleRate;
  349. #else
  350.     double                AIFFSampleRate;
  351. #endif                                        /* CAFF, IEEE sample rate                                         */
  352.     Ptr                 MarkerChunk;        /* CAFF, sync track                                                */
  353.     Ptr                 FutureUse1;            /* reserved by Apple                                            */
  354.     Ptr                     FutureUse2;            /* reserved by Apple                                            */
  355.     StateBlockPtr         StateVars;            /* pointer to State Block                                         */    
  356.     LeftOverBlockPtr     LeftOverSamples;    /* used to save truncated samples between compression calls       */
  357.     unsigned short        compressionID;        /* 0 means no compression, non zero means compressionID            */
  358.     unsigned short         packetSize;            /* CAFF, number of bits in compressed sample packet                */    
  359.     unsigned short         snthID;                /* Resource ID of Sound Manager snth that contains NRT C/E        */
  360.     unsigned short         sampleSize;            /* CAFF, number of bits in non-compressed sample                 */
  361. #ifndef __cplusplus
  362.     char                 sampleArea[];        /* space for when samples follow directly                        */        
  363. #endif
  364. }    
  365. CmpSoundHeader, *CmpSoundHeaderPtr;
  366.  
  367. typedef struct
  368.  {
  369.     char                 *samplePtr;            /* if nil then samples are in sample area                        */
  370.     unsigned long         numChannels;        /* AIFF, number of channels,  ie mono = 1                         */
  371.     Fixed                sampleRate;            /* sample rate in Apples Fixed point representation                */
  372.     unsigned long         loopStart;            /* same meaning as regular SoundHeader                            */    
  373.     unsigned long         loopEnd;            /* same meaning as regular SoundHeader                            */
  374.     unsigned char         encode;                /* data structure used ,  stdSH, extSH, or cmpSH                */
  375.     unsigned char         baseNote;            /* same meaning as regular SoundHeader                            */
  376.     unsigned long         numSampleFrames;    /* length in total number of frames                                */
  377.     #if sizeof(double) == 12    
  378.     extended80            AIFFSampleRate;
  379. #else
  380.     double                AIFFSampleRate;
  381. #endif                                        /* CAFF, IEEE sample rate                                         */
  382.         /* AIFF, IEEE sample rate                                         */
  383.     Ptr                 MarkerChunk;        /* AIFF, sync track                                                */
  384.     Ptr                 InstrumentChunks;    /* AIFF,                                                         */
  385.     Ptr                 AESRecording;        /* AIFF,                                                         */
  386.     unsigned short         sampleSize;            /* AIFF, number of bits in sample                                 */
  387.     unsigned short         FutureUse1;            /* reserved by Apple                                            */    
  388.     unsigned long         FutureUse2;            /* reserved by Apple                                            */    
  389.     unsigned long         FutureUse3;            /* reserved by Apple                                            */    
  390.     unsigned long         FutureUse4;            /* reserved by Apple                                            */
  391. #ifndef __cplusplus
  392.     char                 sampleArea[];        /* space for when samples follow directly                        */        
  393. #endif
  394. }    
  395. ExtSoundHeader, *ExtSoundHeaderPtr;
  396.  
  397.  
  398.  
  399. typedef struct{
  400.     short                smMaxCPULoad;
  401.     short                smNumChannels;
  402.     short                smCurCPULoad;
  403. }
  404. SMStatus, *SMStatusPtr;
  405.  
  406.  
  407. typedef struct{ 
  408.     Fixed                scStartTime;
  409.     Fixed                scEndTime;
  410.     Fixed                scCurrentTime;
  411.     Boolean                scChannelBusy;
  412.     Boolean                scChannelDisposed;
  413.     Boolean                scChannelPaused;
  414.     char                scUnused;
  415.     unsigned long        scChannelAttributes;
  416.     long                scCPULoad;
  417. }
  418. SCStatus,*SCStatusPtr;
  419.  
  420.  
  421. typedef struct {
  422.     long                dbNumFrames;
  423.     long                dbFlags;
  424.     long                dbUserInfo[2];
  425. #ifndef __cplusplus
  426.     char                dbSoundData[];
  427. #endif
  428. } SndDoubleBuffer, *SndDoubleBufferPtr;
  429.  
  430.  
  431. typedef struct{ 
  432.     long                unitType;
  433.     Fixed                selStart;
  434.     Fixed                selEnd;
  435. }AudioSelection, *AudioSelectionPtr;
  436.  
  437.  
  438. typedef struct {
  439.     short                dbhNumChannels;
  440.     short                dbhSampleSize;
  441.     short                dbhCompressionID;
  442.     short                dbhPacketSize;
  443.     Fixed                dbhSampleRate;
  444.     SndDoubleBufferPtr    dbhBufferPtr[2];
  445.     ProcPtr                dbhDoubleBack;
  446. }
  447. SndDoubleBufferHeader, *SndDoubleBufferHeaderPtr;
  448.  
  449. typedef struct ModRef {
  450.     unsigned short modNumber;
  451.     long modInit;
  452. } ModRef;
  453.  
  454.  
  455. typedef struct SndListResource {
  456.     short format;
  457.     short numModifiers;
  458.     ModRef modifierPart[1];         /*This is a variable length array*/
  459.     short numCommands;
  460.     SndCommand commandPart[1];      /*This is a variable length array*/
  461.     char dataPart[1];               /*This is a variable length array*/
  462. } SndListResource;
  463.  
  464. typedef SndListResource *SndListPtr;
  465.  
  466.  
  467. pascal OSErr SndDoCommand(SndChannelPtr chan,const SndCommand *cmd,Boolean noWait)
  468.     = 0xA803; 
  469. pascal OSErr SndDoImmediate(SndChannelPtr chan,const SndCommand *cmd)
  470.     = 0xA804; 
  471. pascal OSErr SndNewChannel(SndChannelPtr *chan,short synth,long init,SndCallBackProcPtr userRoutine)
  472.     = 0xA807; 
  473. pascal OSErr SndDisposeChannel(SndChannelPtr chan,Boolean quietNow)
  474.     = 0xA801; 
  475. pascal OSErr SndPlay(SndChannelPtr chan,Handle sndHdl,Boolean async)
  476.     = 0xA805; 
  477. pascal OSErr SndControl(short id,SndCommand *cmd)
  478.     = 0xA806;
  479.  
  480.  
  481. /*••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
  482. /*
  483. /*            New Enhanced Sound Manager 7.0 Calls    <18 Aug 1989 NJC>
  484. /*
  485. /*            These will soon be supported by a Glue Library so that all this ugly
  486. /*            shit will disappear and the traps will look like non-indexed traps.
  487. /*
  488. /*••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
  489.  
  490. #define    MOVEL                        0x203C    
  491.  
  492. /* constants for MACE in the dispatcher */
  493. #define    MACEToolNum                    16        
  494. #define    sMgrMACEVersion                 0
  495. #define sMgrComp3to1                 4
  496. #define sMgrExp1to3                     8
  497. #define sMgrComp6to1                12
  498. #define sMgrExp1to6                    16
  499.  
  500. /* constants for Sound Manager Extensions in the dispatcher */
  501. #define sMgrToolNum                     8        
  502. #define    sMgrSndStartFilePlay        3328        /* (13*256)+0 */
  503. #define    sMgrSndPauseFilePlay        516            /* (2*256)+4 */
  504. #define    sMgrSndStopFilePlay            776            /* (3*256)+8 */
  505. #define    sMgrSndSoundManagerVersion    12
  506. #define    sMgrSndChannelStatus        16
  507. #define    sMgrSndManagerStatus        20
  508. #define    sMgrSndGetSysBeepState        24
  509. #define    sMgrSndSetSysBeepState        28
  510. #define    sMgrSndPlayDoubleBuffer        32
  511. #define    sMgrSndGetBufferStufferLoad    36
  512. #define    sMgrSndGetMixerLoad            40
  513.  
  514. pascal unsigned long 
  515. SndSoundManagerVersion (void)
  516.     = {MOVEL,sMgrSndSoundManagerVersion,sMgrToolNum,0xA800};
  517.  
  518. pascal OSErr
  519. SndStartFilePlay ( SndChannelPtr theChannel, short fRefNum,
  520.             short resNum, long bufferSize, Ptr bufferPtr,
  521.             AudioSelectionPtr theSelection, ProcPtr theCompletion, Boolean async)
  522.     = {MOVEL,sMgrSndStartFilePlay,sMgrToolNum,0xA800};
  523.  
  524. pascal OSErr
  525. SndPauseFilePlay (SndChannelPtr theChannel)
  526.     = {MOVEL,sMgrSndPauseFilePlay,sMgrToolNum,0xA800};
  527.  
  528. pascal OSErr
  529. SndStopFilePlay (SndChannelPtr theChannel, Boolean noWait)
  530.     = {MOVEL,sMgrSndStopFilePlay,sMgrToolNum,0xA800};
  531.     
  532. pascal OSErr 
  533. SndChannelStatus (SndChannelPtr theChannel, 
  534.                 short theLength, SCStatusPtr theStatus)
  535.     = {MOVEL,sMgrSndChannelStatus,sMgrToolNum,0xA800};
  536.     
  537. pascal OSErr 
  538. SndManagerStatus (short theLength, SMStatusPtr theStatus)
  539.     = {MOVEL,sMgrSndManagerStatus,sMgrToolNum,0xA800};
  540.     
  541. pascal void 
  542. SndGetSysBeepState ( short *sysBeepState)
  543.     = {MOVEL,sMgrSndGetSysBeepState,sMgrToolNum,0xA800};
  544.  
  545. pascal OSErr 
  546. SndSetSysBeepState (short sysBeepState)
  547.     = {MOVEL,sMgrSndSetSysBeepState,sMgrToolNum,0xA800};
  548.  
  549. pascal OSErr
  550. SndPlayDoubleBuffer ( SndChannelPtr theChannel, SndDoubleBufferHeaderPtr theParams)
  551.     = {MOVEL,sMgrSndPlayDoubleBuffer,sMgrToolNum,0xA800};
  552.  
  553. pascal short 
  554. SndGetBufferStufferLoad (short channelFeatures)
  555.     = {MOVEL,sMgrSndGetBufferStufferLoad,sMgrToolNum,0xA800};
  556.  
  557. pascal short 
  558. SndGetMixerLoad (short numChannels)
  559.     = {MOVEL,sMgrSndGetMixerLoad,sMgrToolNum,0xA800};
  560.  
  561.  
  562. pascal unsigned long
  563. MACEVersion ()
  564.     = {MOVEL,sMgrMACEVersion,MACEToolNum,0xA800};
  565.  
  566. pascal void Comp3to1 ( Ptr inBuffer, Ptr outBuffer, unsigned long  Cnt, Ptr inState,
  567.         Ptr outState, unsigned long  numChannels, unsigned long  whichChannel )
  568.     = {MOVEL,sMgrComp3to1,MACEToolNum,0xA800};
  569.  
  570. pascal void Exp1to3 ( Ptr inBuffer, Ptr outBuffer, unsigned long  Cnt, Ptr inState, 
  571.         Ptr outState, unsigned long  numChannels, unsigned long  whichChannel)
  572.     = {MOVEL,sMgrExp1to3,MACEToolNum,0xA800};
  573.  
  574. pascal void Comp6to1 ( Ptr inBuffer, Ptr outBuffer, unsigned long  Cnt, Ptr inState, 
  575.         Ptr outState, unsigned long  numChannels, unsigned long  whichChannel )
  576.     = {MOVEL,sMgrComp6to1,MACEToolNum,0xA800};
  577.  
  578. pascal void Exp1to6 ( Ptr inBuffer, Ptr outBuffer, unsigned long  Cnt, Ptr inState,
  579.         Ptr outState, unsigned long  numChannels, unsigned long  whichChannel)
  580.     = {MOVEL,sMgrExp1to6,MACEToolNum,0xA800};
  581.  
  582.  
  583. pascal void SetSoundVol(short level); 
  584. pascal void GetSoundVol(short *level); 
  585. pascal void StartSound(Ptr synthRec,long numBytes,SndCompletionProcPtr completionRtn); 
  586. pascal void StopSound(void); 
  587. pascal Boolean SoundDone(void); 
  588. pascal OSErr SndAddModifier(SndChannelPtr chan,SndModifierProcPtr modifier,
  589.     short id,long init)
  590.     = 0xA802; 
  591.  
  592.  
  593. #endif
  594.  
  595.  
  596.